package com.situ.mall.pattern.simplefactory;

public class KeyboardFactory {

    public static IKeyboard crateKeyboard(String brand) {
        IKeyboard keyboard = null;
        switch (brand) {
            case "Dell":
                keyboard = new DellKeyboard();
                break;
            case "HP":
                keyboard = new HPKeyboard();
                break;
            case "Lenovo":
                keyboard = new LenovoKeyboard();
                break;
        }
        return keyboard;
    }
}
